<template>
	<view class="text">
	我是grandson:	{{text.value}}
	</view>
</template>

<script>
	import {
		inject,
		ref
	} from 'vue';
	export default {
		setup() {
			const text = ref("")
			text.value = inject("text");

			return {
				text
			}

		}
	}
</script>

<style scoped>
	.text {
		color: green;
	}
</style>
